/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.teach.dao;

import com.lczyfz.istep.common.persistence.CrudDao;
import com.lczyfz.istep.common.persistence.annotation.MyBatisDao;
import com.lczyfz.istep.modules.teach.entity.TeachExam;
import com.lczyfz.istep.modules.teach.entity.TeachStudentExam;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;
import java.util.List;

/**
 * 学生_考试中间表DAO接口
 * @author cqh
 * @version 2017-06-15
 */
@MyBatisDao
public interface TeachStudentExamDao extends CrudDao<TeachStudentExam> {

    //删除学生和考试关联表数据-真删除
    void deleteStudentExam(@Param("distributeId")String distributeId);

    public List<TeachExam> findAnswerTimeByExamId(@Param("examId")String examId,@Param("DEL_FLAG_NORMAL")String DEL_FLAG_NORMAL);

    public List<TeachStudentExam> findFirstTimeAndCountByExamId(@Param("examId")String examId,@Param("userId")String userId,@Param("DEL_FLAG_NORMAL")String DEL_FLAG_NORMAL);

    void setFirstTimeByExamId(@Param("examId")String examId,@Param("userId")String userId,@Param("endDate")Date endDate);

    void setexamFrequencyByExamId(@Param("examId")String examId,@Param("userId")String userId,@Param("examFrequency")String examFrequency);


}